
;;;
;;; An example of a search strategy.
;;;
;;; By Philip W. L. Fong
;;;

(defun make-mysterious-strategy (depth-limit) 
  "Guess what search strategy this function returns."
  (let
      ((node-store nil))
    (make-strategy
     ;; node-store-insert
     #'(lambda (node) 
	 (setf node-store (cons node node-store)))
     ;; node-store-remove
     #'(lambda ()
	 (let ((node (first node-store)))
	   (setf node-store (rest node-store))
	   node))
     ;; node-store-empty-p
     #'(lambda ()
	 (null node-store))
     ;; pruning-test
     #'(lambda (node)
	 (> (node-depth node) depth-limit)))))

